/**
 * common constants
 * ==============================================================================
 */
/**
 * 公共信息
 * @type {{ERROR: string, SUCCESS: string}}
 */
var Messages = {
    HTTP_STATUS: {
        SUCCESS: 200
    },

    TOF: {
        TRUE: true,
        FALSE: false
    },

    PLEASE_LOGIN: '请登录后再次操作',

    ERROR: '操作失败, 请稍候再试',
    ERROR_LOAD: '加载失败, 请稍候再试!',
    SUCCESS: '操作成功',
    DELETE_SUCCESS: '删除成功',
    DELETE_FAILED: '删除失败',
    CONFIRM_DELETE: '确认删除?',

    REGISTER_SUCCESS: '注册成功',
    RETRIEVE_SUCCESS: '密码重置成功',

    PLEASE_READ_USER_AGREEMENT: '请详细阅读用户协议,并同意后继续',
    PLEASE_ENTER_MOBILE: '请输入手机号码',

    PRESENT_SUCCESS: '优惠券转赠成功',
    PRESENT_FAILED: '优惠券转赠失败'
};

/**
 * 正则
 * @type {{MOBILE: RegExp}}
 */
var Pattern = {

    MOBILE: /^[+]{0,1}(\d){1,3}[ ]?([-]?((\d)|[ ]){1,12})+$/,

    CHINA_MOBILE: /^1(3|4|5|7|8)\d{9}$/,

    PWD: /^[0-9a-zA-Z_]{6,16}$/,

    VALIDATE: /^[0-9]{4}$/,

    NAME: /[\u4e00-\u9fa5]{2,6}/,

    NICKNAME: /[\u4e00-\u9fa5]{2,6}|[a-zA-Z\d]{2,12}/,

    WECHAT: /^[a-zA-Z]{0,}[-_a-zA-Z0-9]{5,19}$/,
}